<!DOCTYPE html>
<html>

	<head>
		<title></title>
		<meta charset="UTF-8">
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/css/bootstrap.css" />
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/css/bootstrap-responsive.css" />
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Admin/css/style.css" />
		<link rel="stylesheet" type="text/css" href="__PUBLIC__/Index/css/fileinput.css" />
		<style type="text/css">
			body{
				padding-bottom: 40px;
			}
			.sidebar-nav {
				padding: 9px 0;
			}
			@media (max-width: 980px) {
				/* Enable use of floated navbar text */
				.navbar-text.pull-right {
					float: none;
					padding-left: 5px;
					padding-right: 5px;
				}
			}
		</style>
	</head>
	<form action="" method="post">
		<table class="table table-bordered table-hover definewidth m10">
			<tr>
				<td width="10%" class="tableleft">产品名称</td>
				<td>
					<input type="text" name="title" />
				</td>
			</tr>
			<tr>
				<td class="tableleft">产品编号</td>
				<td>
					<input type="text" name="bh" />
				</td>
			</tr>
			<tr>
				<td class="tableleft">产品价格</td>
				<td>
					<input type="text" name="monay" />
				</td>
			</tr>
			<tr>
				<td class="tableleft">产品图片</td>
				<td>
					<form enctype="multipart/form-data">
						<input id="file" name="content" class="file" type="file" multiple data-min-file-count="1">
					</form>
				</td>
			</tr>
			<tr>
				<td class="tableleft"></td>
				<td>
					<button type="submit" class="btn btn-primary" type="button">保存</button>
				</td>
			</tr>
		</table>
	</form>
	<script src="__PUBLIC__/Index/js/jquery.js"></script>
	<script src="__PUBLIC__/Index/js/fileinput.js" type="text/javascript"></script>
	<script src="__PUBLIC__/Index/js/fileinput_locale_zh.js" type="text/javascript"></script>
	<script src="__PUBLIC__/Index/js/bootstrap.min.js" type="text/javascript"></script>
	<script>
		$("#file").fileinput({
			uploadUrl: '/index.php/Admin/Cp/upload',
			allowedFileExtensions : ['jpg', 'png','gif'],
			overwriteInitial: false,
			maxFileSize: 1000,
			maxFilesNum: 1,
			slugCallback: function(filename) {
				//$name=filename.replace('(', '_').replace(']', '_');
				$name=filename.replace('(', '_').replace(']', '_');
				return $name;
			}
		});
		$("#file").on("fileuploaded", function (event, data, previewId, index) {
			$(".file-caption-name").attr('title',data.info);
		});
	</script>
	</body>

</html>